from random import randint
from time import time

n = int(input())
nn = n*n
data = []

for i in range(n):
    data.append(randint(0,nn))
# print data
print 'select sort begin:'
print ' running...'
t1 = int(time()*1000)
for i in range(n-1):
    for j in range(i+1,n):
        if data[i]>data[j] :
            data[i]^=data[j]
            data[j]^=data[i]
            data[i]^=data[j]
t2 = int(time()*1000)
print 'select sort end.'
# print data

p = True
for i in range(n-1):
    if data[i]>data[i+1] :
        p = False
        break

print 'the answer of select sort is '+('right'if p else 'wrong')+' !!!'
print 'run time: %dms'%(t2-t1)
